package com.itheima.a01plymorphismdemo1;

public class Animal {
    //变量
    private int age;
    private String color;

    //构造方法


    public Animal() {
    }

    public Animal(int age, String color) {
        this.age = age;
        this.color = color;
    }


    //get/set

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public String getColor() {
        return color;
    }

    public void setColor(String color) {
        this.color = color;
    }


    //成员方法
    //吃
    public void eat(String something) {
        System.out.println("吃东西");
    }
}
